class ProgramsController < ApplicationController

  before_filter :find_channel

  # params[:channel_name]/params[:day_of_week]
  def index
    @programs = @channel.programs.where("day_of_week = ?", params[:day_of_week])
    respond_to do |format|
      format.xml
    end
  end
  


  protected

    def find_channel
      @channel = Channel.find_by_name(params[:channel_name])
    end

end
